﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Ld.Client.Silverlight.Views;

namespace Ld.Client.Silverlight
{
    public partial class Left : UserControl
    {
        private App app = Application.Current as App;

        public Left()
        {
            InitializeComponent();
        }

        private void Expander_Expanded(object sender, RoutedEventArgs e)
        {
            if (this.tree != null)
            {
                this.tree.Visibility = System.Windows.Visibility.Visible;
            }
        }

        private void Expander_Collapsed(object sender, RoutedEventArgs e)
        {
            if (this.tree != null)
            {
                this.tree.Visibility = System.Windows.Visibility.Collapsed;
            }
        }

        private void tviProduct_Selected(object sender, RoutedEventArgs e)
        {
            app.MainPage.CurrentContent.Child = new ProductView();
        }       
    }
}
